﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Home.Master" AutoEventWireup="true"
    CodeBehind="Detail.aspx.cs" Inherits="RealtorsPortal.Detail" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cphHeader" runat="server">
    <title>Advertisement detail</title>
    <link rel="stylesheet" type="text/css" href="Scripts/slider/themes/default/jquery.slider.css" />
    <!--[if IE 6]>
    <link rel="stylesheet" type="text/css" href="Scripts/slider/themes/default/jquery.slider.ie6.css" />
    <![endif]-->
    <script type="text/javascript" src="Scripts/jquery.min.js"></script>
    <script type="text/javascript" src="Scripts/slider/jquery.slider.min.js"></script>
    <script type="text/javascript" src="Scripts/jquery-ui.js"></script>
    <script type="text/javascript">
        jQuery(document).ready(function ($) {
            $(".slider").slideshow({
                width: 400,
                height: 300,
                pauseOnHover: false,
                transition: ['slideLeft', 'slideRight', 'slideTop', 'slideBottom']
            });

            $(".caption").fadeIn(500);

            // playing with events:

            $(".slider").bind("sliderChange", function (event, curSlide) {
                $(curSlide).children(".caption").hide();
            });

            $(".slider").bind("sliderTransitionFinishes", function (event, curSlide) {
                $(curSlide).children(".caption").fadeIn(500);
            });

            //set tabs view
            $("#tabs").tabs();
        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphWrapper" runat="server">
    <div class="full_box">
        <div class="left_title">
            <img src="images/bg_left_title.png" />
        </div>
        <div class="full_container">
            <div class="title">
                <span>Detail</span>
            </div>
            <asp:Panel ID="PropertyDetailPanel" runat="server">
                <div id="property_detail">
                    <asp:Repeater ID="rptPropertyDetail" runat="server">
                        <ItemTemplate>
                            <div class="detail_title">
                                <%#Eval("Title") %>
                            </div>
                            <!--End .detail_title -->
                            <div class="detail_header">
                                <b>Poster:</b>
                                <%#Eval("Username") %>
                                <b style="margin-left: 20px;">Posted date: </b>
                                <%#Eval("PostedDate") %>
                            </div>
                            <!--End .detail_header -->
                            <hr style="float: left; width: 100%;" />
                            <div class="detail_images">
                                <div class="slider">
                                    <div>
                                        <img src="<%#Eval("ImageUrl") %>" alt="" />
                                    </div>
                        </ItemTemplate>
                    </asp:Repeater>
                    <asp:Repeater ID="rptSlideShow" runat="server">
                        <ItemTemplate>
                            <div>
                                <img src='AdminCP\<%#Eval("ImageUrl") %>' alt="" />
                            </div>
                        </ItemTemplate>
                    </asp:Repeater>
                </div>
                <!--End #slider -->
        </div>
        <!--End .detail_images -->
        <div class="detail_info">
            <fieldset>
                <legend>Property infomation</legend>
                <asp:Repeater ID="rptDetail2" runat="server">
                    <ItemTemplate>
                        <asp:HiddenField ID="hdfAdvId" runat="server" Value='<%#Eval("AdvId") %>' />
                        <div class="detail_row" style="margin-top: 10px;">
                            <label>
                                Advertise type:
                            </label>
                            <%#Eval("Type") %>
                        </div>
                        <div class="detail_row">
                            <label>
                                Property category:
                            </label>
                            <%#Eval("CategoryName") %>
                        </div>
                        <div class="detail_row">
                            <label>
                                Address:
                            </label>
                            <%#Eval("Address") %>
                        </div>
                        <div class="detail_row">
                            <label>
                                City:
                            </label>
                            <%#Eval("CityName") %>
                            <b style="font-size: 17px; margin-left: 50px;">District:</b>
                            <%#Eval("DistrictName") %>
                        </div>
                        <div class="detail_row">
                            <label>
                                Bath room(s):
                            </label>
                            <%#Eval("BathRoom") %>
                            <b style="font-size: 17px; margin-left: 80px;">Bed rooms(s):</b>
                            <%#Eval("BedRoom") %>
                        </div>
                        <div class="detail_row">
                            <label>
                                Land area:
                            </label>
                            <%#Eval("LandArea") %>
                            m2 <b style="font-size: 17px; margin-left: 40px;">Built year:</b>
                            <%#Eval("BuiltYear") %>
                        </div>
                        <div class="detail_row">
                            <label>
                                Amenities:
                            </label>
                            <%#Eval("Amenities")%>
                        </div>
                        <div class="detail_row">
                            <label>
                                Price:
                            </label>
                            <span class="price">
                                <%#Eval("Price")%>
                                $</span>
                        </div>
                        <div class="detail_row" style="margin: 0px 60px;">
                            If you care, call now
                            <%#Eval("Phone")%>
                            or send email:
                            <a href='mailto:<%#Eval("Email")%>'><%#Eval("Email")%></a>
                        </div>
                        </fieldset> </div>
                        <!--End .detail_info -->
                        <div class="detail_description">
                            <b>Description</b>
                            <hr />
                            <%#Eval("Description")%>
                        </div>
                    </ItemTemplate>
                </asp:Repeater>
            </fieldset>
            <div class="detail_other">
                <div class="comments_left">
                    <b>Send comment</b>
                    <hr width="90%" />
                    <div class="comment_input">
                        <div class="comment_row">
                            <label>
                                Name (*):
                            </label>
                            <asp:TextBox ID="txtFullName" runat="server" Width="200px"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="required"
                                Font-Bold="True" ForeColor="Red" ControlToValidate="txtFullName" ValidationGroup="comment"></asp:RequiredFieldValidator>
                        </div>
                        <!--End .comment_row -->
                        <div class="comment_row">
                            <label>
                                Content(*):</label>
                            <asp:TextBox ID="txtContent" runat="server" TextMode="MultiLine" Height="50px" Width="200px"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="required"
                                Font-Bold="True" ForeColor="Red" ControlToValidate="txtContent" ValidationGroup="comment"></asp:RequiredFieldValidator>
                        </div>
                        <div class="comment_row">
                            <label>
                                &nbsp;</label>
                            <asp:Button ID="btnComment" runat="server" Text="Comment" Width="100px" Height="50px"
                                Style="margin-bottom: 50px;" ValidationGroup="comment" OnClick="btnComment_Click" />
                        </div>
                        <!--End .comment_row -->
                        <div class="comment_row">
                            <label>
                                &nbsp;</label>
                            <asp:Label ID="lblCommentStatus" runat="server" Font-Bold="True" ForeColor="#9900FF"></asp:Label>
                        </div>
                        <!--End .comment_row -->
                    </div>
                    <!--End .comment_input -->
                </div>
                <!--End .comments_left -->
                <div class="contact_right">
                    <b>Contact form</b>
                    <hr width="90%" />
                    <div class="comment_input">
                        <div class="comment_row">
                            <label>
                                Name (*):
                            </label>
                            <asp:TextBox ID="txtName" runat="server" Width="200px"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="required"
                                ControlToValidate="txtName" Font-Bold="True" ForeColor="Red" ValidationGroup="contact"></asp:RequiredFieldValidator>
                        </div>
                        <!--End .comment_row -->
                        <div class="comment_row">
                            <label>
                                Email (*):
                            </label>
                            <asp:TextBox ID="txtEmail" runat="server" Width="200px"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage="required"
                                ControlToValidate="txtEmail" Font-Bold="True" ForeColor="Red" ValidationGroup="contact"></asp:RequiredFieldValidator>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="invalid"
                                ControlToValidate="txtEmail" Font-Bold="True" ForeColor="Red" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
                                ValidationGroup="contact"></asp:RegularExpressionValidator>
                        </div>
                        <!--End .comment_row -->
                        <div class="comment_row">
                            <label>
                                Title:
                            </label>
                            <asp:TextBox ID="txtTitle" runat="server" Width="200px"></asp:TextBox>
                        </div>
                        <!--End .comment_row -->
                        <div class="comment_row">
                            <label>
                                Message (*):</label>
                            <asp:TextBox ID="txtMessage" runat="server" TextMode="MultiLine" Height="50px" Width="200px"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ErrorMessage="required"
                                ControlToValidate="txtMessage" Font-Bold="True" ForeColor="Red" ValidationGroup="contact"></asp:RequiredFieldValidator>
                        </div>
                        <!--End .comment_row -->
                        <div class="comment_row">
                            <label>
                                &nbsp;</label>
                            <asp:Button ID="btnSend" runat="server" Text="Send message" Width="100px" Height="50px"
                                Style="margin-bottom: 50px;" ValidationGroup="contact" OnClick="btnSend_Click" />
                        </div>
                        <!--End .comment_row -->
                        <div class="comment_row">
                            <label>
                                &nbsp;</label>
                            <asp:Label ID="lblContactStatus" runat="server" Font-Bold="True" ForeColor="#0066FF"></asp:Label>
                        </div>
                        <!--End .comment_row -->
                    </div>
                    <!--End .comment_input -->
                </div>
                <!--End .contact_right -->
                <b>Comments</b>
                <hr width="60%" />
                <div id="comments">
                    <asp:ListView ID="lvwComments" runat="server">
                        <ItemTemplate>
                            <div class="comment_row_detail">
                                <label>
                                    <%#Eval("FullName")%>
                                    ( <span class="writed_date_cm">
                                        <%#Eval("Date")%></span>):
                                </label>
                                <%#Eval("Content")%>
                            </div>
                        </ItemTemplate>
                    </asp:ListView>
                    <div class="lv_pager">
                        <asp:DataPager ID="DataPager1" QueryStringField="cmpage" PageSize="10" PagedControlID="lvwComments"
                            runat="server">
                            <Fields>
                                <asp:NumericPagerField ButtonType="Link" />
                                <asp:NextPreviousPagerField ButtonType="Button" RenderNonBreakingSpacesBetweenControls="true"
                                    FirstPageText="First" LastPageText="Last" NextPageText="Next" PreviousPageText="Back"
                                    ShowFirstPageButton="true" ShowLastPageButton="true" ShowNextPageButton="true"
                                    ShowPreviousPageButton="true" />
                            </Fields>
                        </asp:DataPager>
                    </div>
                </div>
                <!--End #comments -->
            </div>
            <!--End .detail_other -->
        </div>
        </asp:Panel>
        <!--End .full_container -->
    </div>
    <!--End .full_box -->
</asp:Content>
